package com.example.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.entity.dto.StoreImageDto;
import io.minio.errors.*;
import jakarta.servlet.ServletOutputStream;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.io.OutputStream;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

public interface ImageService extends IService<StoreImageDto> {
    //上传头像
    String uploadAvatar(MultipartFile file,int id) throws IOException;
    //从minio获取图片
    void fetchImageFromMinio(OutputStream stream, String imagePath) throws Exception;
    //缓存图片
    String uploadImage(MultipartFile file, int id) throws IOException;
}
